/********************************************************************************
 * Copyright (c) 2021,2022 Contributors to the CatenaX (ng) GitHub Organisation
 *
 * See the NOTICE file(s) distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Apache License, Version 2.0 which is available at
 * https://www.apache.org/licenses/LICENSE-2.0.
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 *
 * SPDX-License-Identifier: Apache-2.0
 ********************************************************************************/

table {
  width: 100%;
}

.mat-row .mat-cell {
  cursor: pointer;
}

.mat-row:hover {
  outline: 1px solid currentColor;
}

.table--no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 250px;
  justify-content: center;

  &__icon {
    transform: scale(2);
  }
}

.no-hover .mat-cell {
  cursor: default;
}

.no-hover:hover {
  outline: unset;
}

.table--cell {
  padding: 0 10px;
}

.table--selected__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  // Mat row defines fixed height of 48px.
  min-height: 48px;

  @apply bg-primaryLight border-r-2;
}

tr.loading {
  background-image: linear-gradient(to right, transparent 50%, rgba(0, 0, 0, 0.05) 50%);
  background-size: 200% 100%;
  animation: loading 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

tr.loading td {
  opacity: 0.45;
  pointer-events: none;
}

tr.highlighted {
  @apply bg-primaryLight bg-opacity-50;
}

@keyframes loading {
  0% {
    background-position: 0;
  }
  50% {
    background-position: -30%;
  }
  80% {
    background-position: -100%;
  }
  100% {
    background-position: -200%;
  }
}
